package org.raymond.icloud.apis.admin.service;

import org.raymond.icloud.apis.admin.vo.FakeCaptchaVO;
import org.raymond.icloud.common.core.config.FeignConfiguration;
import org.raymond.icloud.common.core.model.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name="i-cloud-client", contextId="common",
        url="${icloud.services.ip}:${icloud.services.port}", path="icloud",
        configuration=FeignConfiguration.class
)
@RequestMapping("/common")
public interface ICommonServiceApi {

    @GetMapping("/public-key")
    Result<String> publicKey();

    @GetMapping("/mobile/captcha")
    Result<FakeCaptchaVO> captcha(@RequestParam String mobile);
}
